home *** CD-ROM | disk | FTP | other *** search
/ Chip 2000 September / Chip_2000-09_cd1.bin / sharewar / Slunec / app / 16 / TEXT.SWG / 0004_WORDSTAR 6.0.pas < prev    next >
Pascal/Delphi Source File  |  1997-05-11  |  47KB  |  1,410 lines

  1.            WordStar International Incorporated
  2.  
  3.           File Format for WordStar Release 6.0
  4.  
  5.               May 21, 1990
  6.  
  7. The WordStar file format is a living specification, continually evolving
  8. to  meet the needs of new provisions  and features. With each release of
  9. WordStar,  new commands are established, and  slight changes are made to
  10. the  meaning of various codes. While every  effort has been made to make
  11. this document an accurate reflection of the WordStar format as it stands
  12. now,  no guarantee can be given that future releases of the program will
  13. follow the specifications as they are expressed here.
  14.  
  15. Textual Information
  16.  
  17. WordStar  files  contain  text which conforms  in  general to the 7- bit
  18. ASCII  code  for printable characters. All  codes below 20h are reserved
  19. for  control  information,  and  the high  (8th)  bit  on  characters is
  20. likewise  used  to  convey information  about  format- ting and document
  21. control.  A  raw stream of the printable  text  in a WordStar file could
  22. therefore  be discerned by masking off  the 8th bit and discarding codes
  23. in  the range of 00h through 1Fh. This method would, of course, omit all
  24. formatting and control information in the file. In addition to stripping
  25. control  char-  acters, symmetrical sequences  must be stripped. See the
  26. descrip- tion of symmetrical sequences below.
  27.  
  28. More  recent versions of WordStar (release 3.4 and above) provide for an
  29. extension  to  the  7-bit  ASCII  character  set  by  means  of  3- byte
  30. sequences.  These  codes all begin with  the lead-in character <1Bh> and
  31. end with the trailer <1Ch>. The code in between these two characters can
  32. be  any value in the range from 00h through FFh. In general, this scheme
  33. is used to support printable codes less than 20h and greater than 7Fh.
  34.  
  35. Starting  with  version 5.0, WordStar  files also contain "Symmetri- cal
  36. Sequences".  These are used for footnotes,  font tags, etc. In addition,
  37. WordStar 5.0 (and later) files begin with a symmet- rical sequence which
  38. is  used  as  a header. See  the  description  of the header symmetrical
  39. sequence below.
  40.  
  41. Formatting and Control Information
  42.  
  43. High Bits
  44.  
  45. All WordStar files terminate normal lines (paragraphs) with the sequence
  46. <0Dh, 0Ah> (carriage return, line feed). A "soft re- turn" <8Dh, 0Ah> is
  47. inserted  in  the text stream at the  points  where lines are subject to
  48. word-wrap.  A "soft space" <A0h> is inserted for tabbing, justification,
  49. and  for  left-margin indenta- tion.  In normal mid-paragraph lines, the
  50. blank  characters  (usually space) following words  at  the end of lines
  51. will be re- tained, so that the user's text is fully retained.
  52.  
  53. An "inactive soft hyphen" <1Eh> is inserted in the text stream at places
  54. where  hyphenation  may be allowed to  occur.  When the word is actually
  55. broken  at the hyphenation spot, the  inactive soft hyphen is changed to
  56. an "active soft hyphen" <1Fh>. This active hyphen, since it falls at the
  57. end  of  a mid-paragraph line, will  be immediately followed by the soft
  58. return mentioned above.
  59.  
  60. In  versions of WordStar prior to 5.0, the  high bit was set on the last
  61. character  of  all non-blank text strings  that fell within the margins.
  62. The  printer drivers relied on this  information to determine which text
  63. was  to be microjustified. This functionali- ty was dropped in the later
  64. versions  in favor of the use of absolute tabs, margin dot commands, and
  65. paragraph styles.
  66.  
  67. Low-order Codes
  68.  
  69. WordStar  (all  versions) uses the ASCII  codes  below 20h for con- trol
  70. information. The specific assignment of meanings to codes is as follows:
  71.  
  72.       00h ^@     Fix the print position.  At print time
  73.              the print head is moved to the absolute
  74.              column position where the ^@ appears in
  75.              the text.  This is primarily used to
  76.              line up proportional text or text that
  77.              mixes the normal and alternate character
  78.              widths.
  79.  
  80.       01h ^A     Alternate font.  At print time the
  81.              alternate character width is selected at
  82.              the point in the text where the ^A
  83.              appears.  The alternate character width
  84.              can be either preinstalled or changed
  85.              with the .cw dot command while ^A is in
  86.              effect.  This print control is now
  87.              obsolete.  See the description of
  88.              symmetrical sequence 15h, below.
  89.  
  90.       02h ^B     Boldface type ON/OFF toggle.
  91.  
  92.       03h ^C     Pause for user response during print.
  93.  
  94.       04h ^D     Double strike printing ON/OFF toggle.
  95.  
  96.       05h ^E     Custom print control.  The user may
  97.              either preinstall the print control
  98.              string to be sent when ^E is encountered
  99.              in the text, or the .xe dot command may
  100.              be used to define it within a document.
  101.  
  102.       06h ^F     Phantom space.  Primarily used to access
  103.              characters on a daisy wheel at the 20h
  104.              print position.  On other types of
  105.              printers results vary.
  106.  
  107.       07h ^G     Phantom rubout.  Primarily used to
  108.              access characters on a daisy wheel at
  109.              the 7Fh print position.  On other types
  110.              of printers results vary.
  111.  
  112.       08h ^H     Overprint previous character.
  113.  
  114.       09h ^I     Tab character.  At print time the number
  115.              of hard spaces required to reach a
  116.              modulus 8 print position is generated.
  117.  
  118.       0Ah ^J     Line feed.  At print time causes a paper
  119.              advance to the next line.
  120.  
  121.       0Bh ^K     Within the main text body, it is used to
  122.              around words or phrases to be indexed.
  123.              In a header or footer line, on odd
  124.              numbered pages all blanks following the
  125.              ^K are suppressed.
  126.  
  127.       0Ch ^L     Form Feed.  At print time causes page to
  128.              be ejected.  No footer lines are printed.
  129.  
  130.       0Dh ^M     Carriage return.
  131.  
  132.       0Eh ^N     Return to the normal character width.
  133.              Now obsolete, see the description for
  134.              the symmetrical sequence 15h, below.
  135.  
  136.       0Fh ^O     Binding space.  Printed as a space.  It
  137.              is used to bind together text that must
  138.              not be split when a paragraph is
  139.              realigned.
  140.  
  141.       10h ^P     Reserved.
  142.  
  143.       11h ^Q     Custom print control.
  144.  
  145.       12h ^R     Custom print control.
  146.  
  147.       13h ^S     Underline ON/OFF toggle.
  148.  
  149.       14h ^T     Superscript ON/OFF toggle.
  150.  
  151.       15h ^U     Reserved.
  152.  
  153.       16h ^V     Subscript ON/OFF toggle.
  154.  
  155.       17h ^W     Custom print control.
  156.  
  157.       18h ^X     Strikeout ON/OFF toggle.  Causes all
  158.              text between successive ^X's to be
  159.              overstruck with a dash (unless re
  160.              installed for some other character).
  161.  
  162.       19h ^Y     Italics ON/OFF toggle (depending on the
  163.              printer).  Versions of WordStar prior to
  164.              5.0 could also use this character as a
  165.              ribbon color change.  This was replaced
  166.              in the later versions with color selec-
  167.              tion via ^P-.
  168.  
  169.       1Ah ^Z     End of file character.  When encountered
  170.              indicates the end of the file.
  171.  
  172.       1Bh ^[     Escape.  Reserved.  Also used as the
  173.              extended character set lead-in code.  If
  174.              the second byte following the 1Bh is a
  175.              1Ch, the intervening byte is an extended
  176.              character.  Example: <1Bh,AEh,1Ch>.
  177.  
  178.       1Ch ^\     Reserved.  Also used as the extended
  179.              character set trailer code if the second
  180.              byte preceding it is a 1Bh.
  181.  
  182.       1Dh ^]     Symmetrical sequence start/stop charac-
  183.              ter (see below).
  184.  
  185.       1Eh ^^     Inactive soft hyphen.  Indicates a
  186.              position at which a word may be broken
  187.              for word-wrap.
  188.  
  189.       1Fh ^_     Active soft hyphen.  Indicates a place
  190.              at which a word has been broken for
  191.              word-wrap.
  192.  
  193. Dot Commands
  194.  
  195. Additional  formatting information is recorded in WordStar files through
  196. means of "dot commands." Dot commands are instructions that are preceded
  197. (in the first position in the line) by a period <2Eh> and stand alone as
  198. the  only entry on that line.  (See the WordStar documentation for exact
  199. descriptions of each dot com- mand.)
  200.  
  201. In  the  table  below,  the codes  in  the  "Usage"  column indicate the
  202. following:
  203.  
  204.      M      Affects only merge printing.
  205.      I      Affects only indexing.
  206.      T      Affects only table of contents.
  207.      P      Affects printing or merge printing.
  208.      E      Affects editing, printing, or merge printing.
  209.  
  210. In  most cases, the dot commands that affect editing show some effect on
  211. the  screen  as the command is typed  or changed. As the cursor is moved
  212. forward  through the document, WordStar  stores enough information about
  213. the  command so that the previous state  can be restored when the cursor
  214. is  later moved backwards. There is a limited amount of storage for this
  215. information and it is controlled with the User Area variable DSTKSZ.
  216.  
  217. Versions prior to 4.0 require whole numbers as arguments to dot commands
  218. that  require  numbers (subscript roll,  page offset). With version 4.0,
  219. math  was  allowed  in the arguments  for  easier  entry of complex page
  220. layouts.  In version 5.0, the ability  to specify measurements in inches
  221. was  added.  In  version 5.5 revi-  sion  C,  measurements in points and
  222. centimeters  were allowed. Inches in 5.0 were specified using the double
  223. quote  only.  In 5.5C, inch measurements  were allowed with 'I' or 'IN'.
  224. Centime- ters are specified as 'C' or 'CM', and points with 'P' or 'PM'.
  225. Upper and lower case are allowed with these. Most dot commands that take
  226. their arguments as number of lines or columns will allow measurements as
  227. well. Refer to the WordStar documentation to find out which dot commands
  228. accept measurements as arguments.
  229.  
  230. The present interpretation of dot commands is:
  231.  
  232.     Command  Usage     Meaning
  233.  
  234.     .AV      M     Ask for variable.  Requests the user to
  235.              enter data from the keyboard at print
  236.              time for a specific variable.
  237.  
  238.     .AW      E M     Aligning and word wrap ON/OFF.  Enables
  239.              or disables aligning and word wrap at a
  240.              specific point in the document.  Used
  241.              primarily to prevent changes to tables.
  242.  
  243.     .BN      P     Bin select.  Selects one of four sheet
  244.              feeder bins at print time.
  245.  
  246.     .BP      P     Bidirectional print ON/OFF.  Enables and
  247.              disables bidirectional printing.  If the
  248.              printer does not have bidirectional
  249.              printing capability, this command is
  250.              ignored.
  251.  
  252.     .CC      E P     Conditional column break.  Like the .CP
  253.              command, but works with columnar breaks
  254.              instead.  If the number of lines
  255.              following the conditional column break
  256.              command fit on the current page, then
  257.              there is no effect, otherwise, a
  258.              columnar break will occur.
  259.  
  260.     .CO      E P     Columns.  Allows the user to specify the
  261.              number of columns and optionally, the
  262.              gutter width in columns or inches.
  263.  
  264.     .CP      E P     Conditional page break.  If there are
  265.              less than the number of lines specified
  266.              remaining on the page, then a page break
  267.              is generated.  If the number of lines
  268.              following the conditional page break fit
  269.              on the current page, then there is no
  270.              effect.  Takes the line height changes
  271.              into account.
  272.  
  273.     .CS      P     Clear screen and display message.  This
  274.              command is used to clear the screen
  275.              during printing.  If a message follows
  276.              the .CS, it is displayed on the first
  277.              screen line below the Print Menu.
  278.  
  279.     .CV      E P     Convert note type.  For further areas in
  280.              the document, all notes of the first
  281.              type specified will be treated as notes
  282.              of the second type.  Works with
  283.              comments, footnotes, and endnotes.
  284.  
  285.     .CW      P     Character width.  This command allows
  286.              the user to specify the width of the
  287.              characters in 1/120 inch increments.
  288.              This width takes effect on the next line
  289.              of text.  Either the normal (^N) or
  290.              alternate (^A) character width is
  291.              changed depending which is in effect.
  292.              The default is 12 (12/120ths is 10
  293.              characters per inch).
  294.  
  295.     .DF      M     Data file.  This merge print command is
  296.              used to specify the file name which
  297.              holds data that will be merged into
  298.              text.  The data file may be in comma
  299.              delimited format, a dBASE file, or a
  300.              Lotus 123, Symphony, Quattro, or VP-
  301.              Planner worksheet.  The user may also
  302.              optionally change the data separator
  303.              character for that file.
  304.  
  305.     .DM      P     Display a message. Displays a message on
  306.              the screen at print time.  If printing
  307.              in the background, .DM's can "scroll
  308.              off" the screen while it is hidden from
  309.              the user.
  310.  
  311.     .E#      E P     Set endnote value.  Specifies the new
  312.              value for endnote numbering.
  313.  
  314.     .EI      M     End if.  Indicates the final spot in a
  315.              merge print document affected by a .IF
  316.              command.  There must be one .EI for
  317.              every .IF command.
  318.  
  319.     .EL      M     Else.  Used for the "else" case after
  320.              using a .IF command.  .EL commands are
  321.              optional.
  322.  
  323.     .F#      E P     Set footnote value.  Specifies the new
  324.              value for footnote numbering.
  325.  
  326.     .FI      P     File insert.  Prints the specified file
  327.              at that point in the document.  .FI
  328.              commands may be nested up to 7 levels
  329.              deep.  .FI files can be in ASCII,
  330.              WordStar, or Lotus 123, Symphony,
  331.              Quattro, or VP-Planner worksheets.
  332.  
  333.     .FM      P     Footer margin.  The number of blank
  334.              lines from the end of the text on a page
  335.              to the first footer line.  Default is 2.
  336.              The sum of the footer margin plus the
  337.              number of footer lines must be less than
  338.              or equal to the bottom margin.
  339.  
  340.     .FO or F1 P     Footer.  The text following the
  341.              command .F1 will be printed as the first
  342.              footer line on this and all subsequent
  343.              pages.  A .FO (or .F1) followed by one
  344.              or zero blanks  cancels the footer line.
  345.              The footer uses the character width and
  346.              line height in effect at the time
  347.              the .FO (or .F1) command is encountered
  348.              in the text.  .FO can optionally specify
  349.              even or odd numbered page footers.
  350.  
  351.     .F2      P     Second footer.
  352.  
  353.     .F3      P     Third footer.
  354.  
  355.     .GO      P     Go to top or bottom of document.
  356.  
  357.     .HE or H1 P     Header.  The text following the
  358.              command .H1 is printed as the first
  359.              header line on all subsequent pages.  If
  360.              the header command is one of the first
  361.              dot commands on a page it takes effect
  362.              for that page, otherwise it affects the
  363.              following pages.  A .HE or .H1 followed
  364.              by one or zero blanks cancels the header
  365.              line.  The header uses the character
  366.              width and line height in effect at the
  367.              time the .HE or .H1 command is
  368.              encountered in the text.  .HE can
  369.              optionally specify even or odd numbered
  370.              page headers.
  371.  
  372.     .H2      P     Second header.
  373.  
  374.     .H3      P     Third header.
  375.  
  376.     .HM      P     Header margin.  The number of blanks
  377.              lines between the top of the text on a
  378.              page and the last header line.  Default
  379.              is 2.  The sum of the header margin plus
  380.              the number of header lines must be less
  381.              than or equal to the top margin.
  382.  
  383.     .IF      M     If.  Used for conditional merge printing
  384.              in conjunction with the .EL and .EI
  385.              commands.  Only simple conditions can be
  386.              tested using the following operators:
  387.  
  388.                 =    Strings alphabetically equal.
  389.                 <>  Strings unequal.
  390.                 >    Greater than.
  391.                 <    Less than.
  392.                 #=  Numbers equal.
  393.                 #<> Numbers unequal.
  394.                 #>  Greater than.
  395.                 #<  Less than.
  396.  
  397.              .IF commands may be nested up to 255
  398.              levels deep.
  399.  
  400.     .IG or..  E     Ignore.  The text on the remainder of ..
  401.              the line is treated as an unprinted
  402.              comment.
  403.  
  404.     .IX      I     Index.  The text on the remainder of the
  405.              line is put in the index.  A comma is
  406.              used to separate a main index entry from
  407.              a subentry.  If a dash is the first
  408.              character following the .IX, the index
  409.              entry is treated as a cross reference
  410.              entry.  If a plus sign is the first
  411.              character following the .IX, the page
  412.              number for that index entry is printed
  413.              in boldface.
  414.  
  415.     .KR      P     Kerning.  Adjusts space between certain
  416.              pairs of printed characters for fonts
  417.              that contain kerning information.
  418.  
  419.     .L#      P     Line numbering.  Specifies whether to
  420.              turn line numbering off, or the spacing
  421.              and position of the line numbering.
  422.              Also optional is whether to start
  423.              numbering at the beginning of each page
  424.              or the beginning of the document.
  425.  
  426.     .LH      E P     Line height.  Changes current line
  427.              height in 1/48 inch increments.  The
  428.              default is 8/48 or 6 lines per inch.
  429.              All lines following this command are set
  430.              based on the current line height value.
  431.              Optionally, an argument of 'A' or 'a'
  432.              will turn on "auto-leading", and all
  433.              subsequent lines will use the line
  434.              height of the largest font in the line.
  435.  
  436.     .LM      E P     Left margin.  Determines the left edge
  437.              of subsequent text.
  438.  
  439.     .LQ      P     Letter quality ON/OFF.  Enables or
  440.              disables letter quality printing on dot
  441.              matrix printers (ignored if not
  442.              supported on the printer).
  443.  
  444.     .LS      E P     Line spacing.  Selects a line spacing of
  445.              between 1 and 9 for subsequent typing or
  446.              paragraph alignment.  A value of 1 is
  447.              for single spacing, 2 for double
  448.              spacing, etc.
  449.  
  450.     .MA      M     Math.  Stores the results of a complex
  451.              equation in a variable.
  452.  
  453.     .MB      E P     Bottom margin.  The footer or page
  454.              number is printed within this margin.
  455.              The default value is 8 lines.
  456.  
  457.     .MT      E P     Top margin.  The number of lines from
  458.              the beginning of the page to the
  459.              beginning of printed text.  The header
  460.              is printed within this margin.  Default
  461.              value is 3 lines.
  462.  
  463.     .OC      E P     Centering ON/OFF.  When ON, further
  464.              lines in the document will be centered
  465.              within the left and right margins until
  466.              a .OC OFF command is encountered.
  467.  
  468.     .OJ      E P     Output justification ON/OFF.  Command
  469.              which turns right justification ON or
  470.              OFF for subsequent typing or paragraph
  471.              realignment.  When OFF, text is ragged
  472.              at the right margin.  When ON, text is
  473.              flush right.
  474.  
  475.     .OP      P     Omit page number.  At print time no page
  476.              numbers are printed unless the "#" has
  477.              been used in footers or headers.
  478.  
  479.     .P#      E P     Paragraph number.  Specifies the initial
  480.              value and/or the format to use for
  481.              paragraph numbering.
  482.  
  483.     .PA      E P     Page break.  Begin a new page here.
  484.  
  485.     .PC      P     Page column. Indicates the column at
  486.              which the page number will be printed.
  487.              This is active only when the footers are
  488.              not in use and page numbering is turned
  489.              on.  If the column specified is 0, then
  490.              the page number is centered between the
  491.              margins in effect where the .PC command
  492.              is given.
  493.  
  494.     .PE      P     Print endnotes.  When encountered during
  495.              printing, endnotes will be printed at
  496.              this point in the document.
  497.  
  498.     .PF      P     Paragraph realignment while printing.
  499.              May be ON, OFF, or DIS (for dis-
  500.              cretionary).  When ON, subsequent para-
  501.              graphs are realigned as they are print-
  502.              ed.  When OFF, paragraphs are not rea-
  503.              ligned.  When DIS, paragraphs are rea-
  504.              ligned only when merge print data is
  505.              substituted in the document.  Paragraphs
  506.              are aligned using the left, right, and
  507.              paragraph margins currently in effect.
  508.  
  509.     .PG      P     Number pages.  At print time the page
  510.              number is printed at the bottom of the
  511.              page unless a footer overrides it.
  512.              Usually used to restore page numbering
  513.              after being turned off with .OP.
  514.  
  515.     .PL      E P     Page length.  The total number of lines
  516.              in a page assuming 6 lines per inch.  An
  517.              eleven inch page contains 66 lines.
  518.  
  519.     .PM      E P     Paragraph margin.  The left margin to
  520.              use for the first line of every
  521.              subsequent paragraph.  Used for both
  522.              regular and hanging indents.
  523.  
  524.     .PN      E P     Page number.  The current page number.
  525.  
  526.     .PO      P     Page offset.  The number of print
  527.              columns from the left edge of the paper
  528.              to the left margin of text.  The current
  529.              setting of character width (.CW) deter-
  530.              mines the actual amount of
  531.              indentation.  .PO can optionally specify
  532.              even or odd number page offsets.
  533.  
  534.     .PR      P     Printer information.  Currently used to
  535.              select the print orientation for laser
  536.              printers (use .PR OR=L for landscape,
  537.              and .PR OR=P for portrait).
  538.  
  539.     .PS      P     Proportional spacing ON/OFF.  Subsequent
  540.              text is to be printed using a
  541.              proportional font.
  542.  
  543.     .RM      E P     Right margin.  Determines the right edge
  544.              of subsequent paragraphs.
  545.  
  546.     .RP      M     Repeat.  Command to repetitively print
  547.              copies of a document.  The .DF command
  548.              may interfere with the .RP command.
  549.  
  550.     .RR      E P     Ruler.  Embeds a ruler line to be used
  551.              for subsequent typing and alignment.
  552.              The text following the .RR is the exact
  553.              image of the ruler line above the text
  554.              on the screen.  A .RR with a # (0-9)
  555.              specifies a preformatted ruler line
  556.              (stored in the user area).
  557.  
  558.     .RV      M     Read variable.  Merge print command used
  559.              to read one or more of the next data
  560.              from a file into variables.
  561.  
  562.     .SR      P     Sub/superscript roll.  The increments
  563.              (in 1/48ths of an inch) which the
  564.              carriage is to roll up or down for
  565.              subscript and superscript printing.
  566.              Default is 3 (3/48ths of an inch).
  567.  
  568.     .SV      M     Set variable.  Merge print command used
  569.              to store data in a variable.
  570.  
  571.     .TB      E P     Tab stops.  Sets multiple tab stops for
  572.              further editing/printing in the
  573.              document.
  574.  
  575.     .TC      T     Table of contents.  The text following
  576.              the .TC is a table of contents entry.  A
  577.              "#" indicates where the page number is
  578.              to go in the entry.  .TC1 through .TC9
  579.              are used to simultaneously build nine
  580.              other tables.
  581.  
  582.     .UJ      P     Micro justify.  Specifies whether
  583.              subsequent lines are to be micro-
  584.              justified at print time.  When ON, the
  585.              white space necessary to right justify a
  586.              line is spread in very fine increments
  587.              evenly over the line.  When OFF, whole
  588.              blanks are used to spread the white
  589.              space.  When DIS, the printer driver
  590.              decides; microjustification is not
  591.              performed if it slows down printing
  592.              dramatically.
  593.  
  594.     .UL      P     Continuous underlining ON/OFF.  Enables
  595.              or disables underlining of blanks
  596.              between words.
  597.  
  598.     .XE .XQ      P     Custom  print  control.  The  hex  pairs
  599.     .XR .XW         following the dot command define the
  600.              custom print control for ^E, ^Q, ^R, and
  601.              ^W encountered in the text respectively.
  602.              The definition may include up to five
  603.              bytes.
  604.  
  605.     .XL      P     Form feed.  The hex pairs following .XL
  606.              define the print control string to be
  607.              sent to eject the paper to the following
  608.              page when printing.
  609.  
  610.     .XX      P     Strikeout character.  Redefines the
  611.              character used for strikeouts.
  612.  
  613. Symmetrical Sequences
  614.  
  615. Symmetrical  sequences are used for features that cannot be han- dled by
  616. dot commands or print control characters, or that belong embedded in the
  617. text  instead  of in dot commands.  All symmetrical sequences begin with
  618. the  control  character 1DH, followed by a  count  (2 bytes), and a type
  619. byte.  Symmetrical sequences end with a count (2 bytes), and the control
  620. character  1DH. The count is stored low  order byte first and is the sum
  621. of  all  the  characters in the  symmetrical  sequence minus 3 (Thus the
  622. count  can be added to the start address of the sequence to point to the
  623. end  count).  Symmetrical sequences can  contain any character including
  624. 1AH.
  625.  
  626. Note that some symmetrical sequences can contain symmetrical seq- uences
  627. themselves  (Annotations, for example). Currently only one level of this
  628. recursion is used.
  629.  
  630. Also note that all of these sequences are subject to change.
  631.  
  632. The present interpretation of symmetrical sequences is:
  633.  
  634.       Header sequence
  635.  
  636.       Type:
  637.  
  638.       0         Header:
  639.                 Byte: version number in BCD (50h for
  640.                 Release 5.0, 55h for Release 5.5, 60h
  641.                 for Release 6.0)
  642.                 9 bytes: Null terminated driver name
  643.                 for this document.
  644.                 2 bytes: reserved.
  645.                 2 words: 32-bit pointer to the be-
  646.                 ginning of the file's style library
  647.                 (lo word in lo,hi format, high word
  648.                 in lo,hi format).
  649.                 107 bytes: Reserved. (Total 128 bytes
  650.                 for header sequence including counts
  651.                 and leading/trailing 1DH).
  652.  
  653.       Print Controls
  654.  
  655.       1         Color:
  656.                 Byte: Color number (see below).
  657.                 Byte: Previous color in file.
  658.                 The color number is as follows:
  659.                 0 - Black
  660.                 1 - Blue
  661.                 2 - Green
  662.                 3 - Cyan
  663.                 4 - Red
  664.                 5 - Magenta
  665.                 6 - Brown
  666.                 7 - Light Grey
  667.                 8 - Dark Grey
  668.                 9 - Light Blue
  669.                 0AH - Light Green
  670.                 0BH - Light Cyan
  671.                 0CH - Light Red
  672.                 0DH - Light Magenta
  673.                 0EH - Yellow
  674.                 0FH - White on black
  675.  
  676.       2         Font:
  677.                 Word: Font width in HMIs (1/1800ths)
  678.                 Word: Font height in VMIs (1/1440ths)
  679.                 Word: Typestyle (see below)
  680.                 Word: Previous font width
  681.                 Word: Previous font height
  682.                 Word: Previous typestyle
  683.  
  684.                 Please note that the typestyle
  685.                 definitions listed below are partial
  686.                 (more are being added) and may
  687.                 change.
  688.  
  689.                 Typestyles are defined by a word with
  690.                 the high order seven bits defined as
  691.                 follows:
  692.  
  693.             Bit #:  Usage:
  694.  
  695.              15    Proportional flag
  696.              14    Letter quality flag
  697.              13    Symbol mapping high bit
  698.              12    Symbol mapping low bit
  699.                 00 = Code page 437
  700.                 01 = Code page 850
  701.                 10 = Math
  702.                 11 = Symbols
  703.              11    Generic style, high bit
  704.              10    Generic style, low bit
  705.                 00 = Sans serif font
  706.                 01 = Serif font
  707.                 10 = Script font
  708.                 11 = Display font
  709.              9    Set to 1 to indicate that this
  710.                 font symmetrical sequence is
  711.                 different from previous versions.
  712.                 Previous versions had this bit
  713.                 set to 0.
  714.              The low order nine bits (8 through 0)
  715.              contain the typestyle number (which
  716.              corresponds to a named typestyle). When
  717.              a typestyle appears in a font symmetri-
  718.              cal sequence that does not match the
  719.              printer selected, a best guess is made
  720.              for the closest font that will match.
  721.  
  722.              0 LinePrinter
  723.              1 Pica
  724.              2 Elite
  725.              3 Courier
  726.              4 Helv (also Helvetica, CG Triumvirate,
  727.                and Swiss)
  728.              5 Tms Rmn (also CG Times, Times Roman
  729.                and Dutch)
  730.              6 Gothic (see also 130 Letter Gothic)
  731.              7 Script
  732.              8 Prestige (see also 48 Prestige Elite)
  733.              9 Caslon
  734.              10 Orator
  735.              11 Presentations
  736.              12 Helv Cond. (also Swiss Condensed)
  737.              13 Serifa
  738.              14 Blippo
  739.              15 Windsor
  740.              16 Century (also see #23)
  741.              17 ZapfHumanist
  742.              18 Garamond
  743.              19 Cooper
  744.              20 Coronet
  745.              21 Broadway
  746.              22 Bodoni
  747.              23 Cntry Schlbk (also see #16)
  748.              24 Univ. Roman
  749.              25 Helv Outline
  750.              26 Peignot (also Exotic)
  751.              27 Clarendon
  752.              28 Stick
  753.              29 HP-GL Drafting
  754.              30 HP-GL Spline
  755.              31 Times
  756.              32 HPLJ Soft Font
  757.              33 Borders
  758.              34 Uncle Sam Open
  759.              35 Raphael
  760.              36 Uncial
  761.              37 Manhattan
  762.              38 Dom Casual
  763.              39 Old English
  764.              40 Trium Condensed
  765.              41 Trium UltraComp
  766.              42 Trade ExtraCond
  767.              43 American Classic (also Amerigo)
  768.              44 Globe Gothic Outline
  769.              45 UniversCondensed (also Zurich Con-
  770.                 densed)
  771.              46 Univers (also Zurich)
  772.              47 TmsRmnCond (Oki Laserline 6)
  773.              48 PrstElite (see also 8 Prestige)
  774.              49 Optima
  775.              50 Aachen (Postscript)
  776.              51 AmTypewriter
  777.              52 Avant Garde
  778.              53 Benguiat
  779.              54 Brush Script
  780.              55 Carta
  781.              56 Centennial
  782.              57 Cheltenham
  783.              58 FranklinGothic
  784.              59 FrstyleScrpt
  785.              60 FrizQuadrata
  786.              61 Futura
  787.              62 Galliard
  788.              63 Glypha
  789.              64 Goudy
  790.              65 Hobo
  791.              66 LubalinGraph
  792.              67 Lucida
  793.              68 LucidaMath
  794.              69 Machine
  795.              70 Melior (also Zapf Elliptical)
  796.              71 NewBaskrvlle (also Baskerville)
  797.              72 NewCntSchlbk
  798.              73 News Gothic (also Trade Gothic)
  799.              74 Palatino (also Zapf Calligraphic)
  800.              75 Park Avenue
  801.              76 Revue
  802.              77 Sonata
  803.              78 Stencil
  804.              79 Souvenir
  805.              80 TrmpMedievel (also Activa)
  806.              81 ZapfChancery
  807.              82 ZapfDingbats
  808.              83 Stone
  809.              84 CntryOldStyle
  810.              85 Corona
  811.              86 GoudyOldStyle
  812.              87 Excelsior
  813.              88 FuturaCondensed
  814.              89 HelvCompressed
  815.              90 HelvExtraCompressed
  816.              91 Helv Narrow
  817.              92 HelvUltraCompressed
  818.              93 KorinnaKursiv
  819.              94 Lucida Sans
  820.              95 Memphis
  821.              96 Stone Informal
  822.              97 Stone Sans
  823.              98 Stone Serif
  824.              99 Postscript
  825.              100 NPS Utility
  826.              101 NPS Draft
  827.              102 NPS Corr
  828.              103 NPS SansSer Qual
  829.              104 NPS Serif Qual
  830.              105 PS Utility
  831.              106 PS Draft
  832.              107 PS Corr
  833.              108 PS SansSer Qual
  834.              109 PS Serif Qual
  835.              110 Download
  836.              111 NPS ECS Qual (daisy wheel)
  837.              112 PS Plastic (daisy wheel)
  838.              113 PS Metal (daisy wheel)
  839.              114 CloisterBlack
  840.              115 Gill Sans (also Hammersmith)
  841.              116 Rockwell (also Slate)
  842.              117 Tiffany (ITC)
  843.              118 Clearface
  844.              119 Amelia
  845.              120 HandelGothic
  846.              121 OratorSC (Star et al)
  847.              122 Outline (Toshiba)
  848.              123 Bookman Light (Canon)
  849.              124 Humanist (Canon)
  850.              125 Swiss Narrow (Canon)
  851.              126 ZapfCalligraphic (Canon)
  852.              127 Spreadsheet (Quadlaser)
  853.              128 Broughm (Brother printers)
  854.              129 Anelia (Brother printers)
  855.              130 LtrGothic (as defined by Brother)
  856.              131 Boldface (Boldface PS)
  857.              132 High Density (NEC)
  858.              133 High Speed (NEC)
  859.              134 Super Focus (NEC P2200)
  860.              135 Swiss Outline (Cordata)
  861.              136 Swiss Display (Cordata)
  862.              137 Momento Outline (Cordata)
  863.              138 Courier Italic (TI 855)
  864.              139 Text Light (Cordata)
  865.              140 Momento Heavy (Cordata)
  866.              141 BarCode
  867.              142 EAN/UPC
  868.              143 Math-7 (HPLJ)
  869.              144 Math-8 (HPLJ)
  870.              145 Swiss
  871.              146 Dutch
  872.              147 Trend (Nissho)
  873.              148 Holsatia (Qume Laser)
  874.              149 Serif (IBM Pageprinter)
  875.              150 Bandit (Cordata)
  876.              151 Bookman (Cordata)
  877.              152 Casual (Cordata)
  878.              153 Dot (Cordata)
  879.              154 EDP (Epson GQ3500)
  880.              155 ExtGraphics (Epson GQ3500)
  881.              156 Garland (Canon Laser)
  882.              157 PC Line
  883.              158 HP Line
  884.              159 Hamilton (QMS)
  885.              160 Korinna (Cordata)
  886.              161 LineDrw (QMS)
  887.              162 Modern
  888.              163 Momento (Cordata)
  889.              164 MX (Cordata)
  890.              165 PC (Cordata)
  891.              166 PI
  892.              167 Profile (Quadlaser)
  893.              168 Q-Fmt (QMS)
  894.              169 Rule (Cordata)
  895.              170 SB (Cordata)
  896.              171 Taylor (Cordata)
  897.              172 Text (Cordata)
  898.              173 APL
  899.              174 Artisan
  900.              175 Triumvirate
  901.              176 Chart
  902.              177 Classic
  903.              178 Data
  904.              179 Document
  905.              180 Emperor
  906.              181 Essay
  907.              182 Forms
  908.              183 Facet
  909.              184 Micro (also Microstyle, Eurostile)
  910.              185 OCR-A
  911.              186 OCR-B
  912.              187 Apollo (Blaser)
  913.              188 Math
  914.              189 Scientific
  915.              190 Sonoran (IBM Pageprinter)
  916.              191 Square 3
  917.              192 Symbol
  918.              193 Tempora
  919.              194 Title
  920.              195 Titan
  921.              196 Theme
  922.              197 TaxLineDraw
  923.              198 Vintage
  924.              199 XCP
  925.              200 Eletto (Olivetti)
  926.              201 Est Elite (Olivetti)
  927.              202 Idea (Olivetti)
  928.              203 Italico (Olivetti)
  929.              204 Kent (Olivetti)
  930.              205 Mikron (Olivetti)
  931.              206 Notizia (Olivetti)
  932.              207 Roma (Olivetti)
  933.              208 Presentor (Olivetti)
  934.              209 Victoria (Olivetti)
  935.              210 Draft Italic (Olivetti)
  936.              211 PS Capita (Olivetti)
  937.              212 Qual Italic (Olivetti)
  938.              213 Antique Olive (also Provence)
  939.              214 Bauhaus (ITC)
  940.              215 Eras (ITC)
  941.              216 Mincho
  942.              217 SerifGothic (ITC)
  943.              218 Signet Roundhand
  944.              219 Souvenir Gothic
  945.              220 Stymie (ATF)
  946.              221 Bernhard Modern
  947.              222 Grand Ronde Script
  948.              223 Ondine (also Mermaid)
  949.              224 PT Barnum
  950.              225 Kaufmann
  951.              226 Bolt (ITC)
  952.              227 AntOliveCompact (also Provence
  953.                  Compact)
  954.              228 Garth Graphic
  955.              229 Ronda (ITC)
  956.              230 EngShcreibschrift
  957.              231 Flash
  958.              232 Gothic Outline (URW)
  959.              233 Akzidenz-Grotesk
  960.              234 TD Logos
  961.              235 Shannon
  962.              236 Oberon
  963.              237 Callisto
  964.              238 Charter
  965.              239 Plantin
  966.              240 Helvetica Black (PS)
  967.              241 Helvetica Light (PS)
  968.              242 Arnold Bocklin (PS)
  969.              243 Fette Fraktur (PS)
  970.              244 Greek (PS (Universal Greek))
  971.  
  972.       Notes
  973.  
  974.       3         Footnote
  975.                 Word: Line count of footnote text.
  976.                 Word: Offset to the internal sequence
  977.                 containing the footnote number tag.
  978.  
  979.                 If there is an internal tag, the high
  980.                 order bit of this word will be set
  981.                 and the low 15 bits will be the
  982.                 offset of the internal sequence.  If
  983.                 the hi order bit is not set, then
  984.                 this number is the footnote number to
  985.                 use.
  986.                 Byte: Not used, conversion flag is
  987.                 now in the internal tag symmetrical
  988.                 sequence.  If the footnote contains
  989.                 no tag, then this byte is used for
  990.                 the conversion flag.
  991.                 Remaining bytes are for text of the
  992.                 footnote itself.
  993.                 The text can contain another sequence
  994.                 of the same format.  This internal
  995.                 sequence is used to display or print
  996.                 the tag associated with the note:
  997.                 Word: Not used (line count assumed 1)
  998.                 Word: Footnote number.
  999.                 Byte: Conversion flag.  Normally 0,
  1000.                 unless .CV or .F# is used to convert
  1001.                 notes from one type or format to
  1002.                 another.  The format of the low order
  1003.                 nybble of this byte is the same as
  1004.                 the numbers for footnotes, endnotes
  1005.                 and comments.  If this nybble is 4,
  1006.                 convert this note to an endnote.  If
  1007.                 6, convert to a comment.
  1008.                 The high order nybble of this byte is
  1009.                 for the format type of the note
  1010.                 (alphabetic, numeric, etc.).  0 means
  1011.                 to use symbols, 1 is for upper case,
  1012.                 2 is for lower case, and three is for
  1013.                 numbers.
  1014.       4         Endnote
  1015.                 Word: Line count of endnote text.
  1016.                 Word: Offset to the internal sequence
  1017.                 containing the endnote number tag.
  1018.                 If there is an internal tag, the high
  1019.                 order bit of this word will be set
  1020.                 and the low 15 bits will be the
  1021.                 offset of the internal sequence.  If
  1022.                 the hi order bit is not set, then
  1023.                 this number is the endnote number to
  1024.                 use.
  1025.                 Byte: Not used, conversion flag is
  1026.                 now in the internal tag symmetrical
  1027.                 sequence.  If the footnote contains
  1028.                 no tag, then this byte is used for
  1029.                 the conversion flag.
  1030.                 Remaining bytes are for text of the
  1031.                 endnote itself.
  1032.                 The text can contain another sequence
  1033.                 of the same format.  This internal
  1034.                 sequence is used to display or print
  1035.                 the tag associated with the note:
  1036.                 Word: Not used (line count assumed 1)
  1037.                 Word: Endnote number.
  1038.                 Byte: Conversion flag.  Normally 0,
  1039.                 unless .CV is used to convert notes
  1040.                 from one type to another.  The format
  1041.                 of the low order nybble of this byte
  1042.                 is the same as the numbers for
  1043.                 footnotes, endnotes and comments.  If
  1044.                 this byte is 3, convert this note to
  1045.                 a footnote.  If 6, convert to a
  1046.                 comment.
  1047.                 The high order nybble of this byte is
  1048.                 for the format type of the note
  1049.                 (alphabetic, numeric, etc.).  0 means
  1050.                 to use symbols, 1 is for upper case,
  1051.                 2 is for lower case, and three is for
  1052.                 numbers.
  1053.  
  1054.       5         Annotation (arbitrary note)
  1055.                 Word: Line count of annotation text.
  1056.                 Word: Offset to the internal tag
  1057.                 (only the low order 15 bits are used
  1058.                 for this, as in footnotes and end-
  1059.                 notes).  If the high order bit is
  1060.                 set, it indicates that there is an
  1061.                 internal tag.  If there is no inter-
  1062.                 nal tag, the entire word will be 0.
  1063.                 Byte: Conversion flag.  Not used for
  1064.                 annotations.
  1065.                 Remaining bytes are for text of the
  1066.                 annotation itself.
  1067.                 The text can contain another sequence
  1068.                 of the same format.  This internal
  1069.                 sequence is used to display or print
  1070.                 the tag associated with the note:
  1071.                 Word: Not used (line count assumed 1)
  1072.                 Word: Not used.
  1073.                 Remaining bytes are for the text used
  1074.                 to display and print the tag of the
  1075.                 note (can be null).
  1076.                 Byte: Conversion flag.  Not used for
  1077.                 annotations.
  1078.  
  1079.       6         Comment
  1080.                 Word: Line count of the comment.
  1081.                 Word: Tag offset (not used).
  1082.                 Byte: Conversion flag.  Normally 0,
  1083.                 unless .CV is used to convert notes
  1084.                 from one type to another.  The format
  1085.                 of the low order nybble of this byte
  1086.                 is the same as the numbers for
  1087.                 footnotes, endnotes and comments.  If
  1088.                 this byte is 4, convert this note to
  1089.                 an endnote.  If 3, convert to a
  1090.                 footnote.
  1091.                 The high order nybble of this byte is
  1092.                 for the format type of the note
  1093.                 (alphabetic, numeric, etc.).  0 means
  1094.                 to use symbols, 1 is for upper case,
  1095.                 2 is for lower case, and three is for
  1096.                 numbers.
  1097.                 Since comments don't contain internal
  1098.                 tags for display with print control
  1099.                 display off, no internal sequence is
  1100.                 used, and the remaining bytes are the
  1101.                 text of the comment.
  1102.  
  1103.       7         Reserved.
  1104.  
  1105.       8         Reserved.
  1106.  
  1107.       Tabs
  1108.  
  1109.       9         Tabs and dot leaders
  1110.                 Word: Tab size in HMIs
  1111.  
  1112.                 Word: Absolute tab size in HMIs
  1113.                 Byte: Tab type:  Space for hard tab,
  1114.                 soft space for soft tab, '#' for
  1115.                 decimal tab.  Also, '!' is used for
  1116.                 center line tab, ']' for right align
  1117.                 line tab.  Other character such as
  1118.                 '.' or '*' are used for dot leaders.
  1119.                 Byte: Tab size in 1/10th
  1120.  
  1121.       0Ah         Reserved.
  1122.  
  1123.       0Bh         End of page
  1124.                 This sequence should usually be
  1125.                 ignored.  It's used by the WordStar
  1126.                 editor to keep track of page breaks.
  1127.                 It is transient, and moves around
  1128.                 with the page break.
  1129.                 Word: Current VMIs on this page
  1130.                 Word: Line # on page
  1131.                 Byte: Newspaper type column number
  1132.                 Byte: # of newspaper type columns in
  1133.                 effect.
  1134.                 Word: VMI placement from top of page
  1135.                 where newspaper type columns begin.
  1136.                 Word: Line number from top of page
  1137.                 where newspaper type columns begin.
  1138.                 Word: Footnote number currently in
  1139.                 effect.
  1140.                 Word: Total VMIs for footnotes on
  1141.                 this page.
  1142.                 Word:  Total VMIs for footnote header
  1143.                 and separator lines.
  1144.                 Word:  VMIs leftover on this page
  1145.                 from footnote not completely printed
  1146.                 (for running footnotes).
  1147.                 5 words: Reserved.
  1148.  
  1149.       0Ch         Page offset
  1150.                 Reserved for printer driver use only.
  1151.                 Should not appear in files.
  1152.                 Byte: Number of blanks before line
  1153.                 number (0 if no number).
  1154.                 Word: Absolute HMI spot for line
  1155.                 number (0 if no number).
  1156.                 Byte: Number of blanks after line
  1157.                 number.
  1158.                 Word: Absolute HMI spot for start of
  1159.                 text.
  1160.                 Byte: Number of bytes in line number.
  1161.                 Bytes: ASCII of line number.
  1162.  
  1163.       Others
  1164.  
  1165.       0Dh         Paragraph number
  1166.                 Byte: Number of level moves forward
  1167.                 from previous paragraph number. 0 to
  1168.                 stay at current level, 1 to move in a
  1169.                 level.
  1170.                 Byte:  Number of level moves
  1171.                 backwards from previous paragraph
  1172.                 number. 0 to stay at current level
  1173.                 (or forwards if previous byte non-
  1174.                 zero), or number of levels moved left
  1175.                 (2.1.1 going to 3 would mean this
  1176.                 byte would be a 2).
  1177.                 Byte: Level number of this paragraph
  1178.                 number (1 based).
  1179.                 Word: Level 1 number, 0 based.
  1180.                 Word: Level 2 number, 0 based.
  1181.                 Word: Level 3 number, 0 based.
  1182.                 Word: Level 4 number, 0 based.
  1183.                 Word: Level 5 number, 0 based.
  1184.                 Word: Level 6 number, 0 based.
  1185.                 Word: Level 7 number, 0 based.
  1186.                 Word: Level 8 number, 0 based.
  1187.                 31 Bytes indicating the format to use
  1188.                 for this paragraph number, including
  1189.                 a zero terminator.
  1190.  
  1191.       0Eh         Index item
  1192.                 Text for the index item.
  1193.  
  1194.       0Fh         User print control
  1195.                 Word: number of hmis this sequence
  1196.                 uses on the printed page.
  1197.                 Byte: number of characters used for
  1198.                 screen display.
  1199.                 Text: the display string itself.
  1200.                 The remaining bytes contained in this
  1201.                 sequence will be sent directly to the
  1202.                 printer.
  1203.  
  1204.       10h         Graphics insert
  1205.                 Text: File name to use for graphics
  1206.                 insert.  Length is determined from
  1207.                 length of symmetrical sequence.
  1208.  
  1209.       11h         Paragraph style
  1210.                 Word:  New paragraph style number.
  1211.                 This number is an index into the
  1212.                 document's style library.  This is
  1213.                 the style that the user just select-
  1214.                 ed.
  1215.  
  1216.                 Word:  Previously selected paragraph
  1217.                 style number.  This is an index into
  1218.                 the document's style library of the
  1219.                 style previously selected by the
  1220.                 user.
  1221.  
  1222.                 Word:  Previous paragraph 'modified'
  1223.                 style number.  This is the current
  1224.                 style conditions before this selec-
  1225.                 tion was made.  Because attributes
  1226.                 and fonts may have changed since the
  1227.                 last style selection was made, new
  1228.                 temporary styles must be created in
  1229.                 the library to reflect changes.
  1230.  
  1231.                 Word:  Previous-previous selected,
  1232.                 for reverting.  This is the style
  1233.                 selected by the user prior to the
  1234.                 previous style.  This is used to
  1235.                 revert back to the previous style
  1236.                 (^OFP).  This is necessary for
  1237.                 WordStar to know the previously
  1238.                 selected style when moving backwards
  1239.                 in the file without having to keep a
  1240.                 list.
  1241.  
  1242.       12h-14h     Reserved.
  1243.  
  1244.       15h         Alternate/Normal font change
  1245.                 Word:  Normal = 0, Alternate = 1.
  1246.                 The rest of the sequence is like a
  1247.                 font symmetrical sequence, with the
  1248.                 new font characteristics (Width,
  1249.                 height, and typestyle), followed by
  1250.                 the previous font characteristics.
  1251.                 This sequence is inserted by the
  1252.                 editor whenever a ^N or ^A is encoun-
  1253.                 tered when editing,  or when entering
  1254.                 ^PA or ^PN.
  1255.  
  1256.       16h         Truncation
  1257.                 Used when a large symmetrical se-
  1258.                 quence doesn't fit in ram.  Rather
  1259.                 than leave the symmetrical sequence
  1260.                 open, it's shortened to fit in ram.
  1261.                 Both the leading and trailing count
  1262.                 words are adjusted in the offending
  1263.                 symmetrical sequence, and this se-
  1264.                 quence is placed inside the sequence
  1265.                 at the end.  This usually will happen
  1266.                 with large footnotes or endnotes.
  1267.                 The sequence contains no information
  1268.                 (only the count words and the type
  1269.                 byte), but gets translated to
  1270.                 "<TRUNCATED>" when printed or dis-
  1271.                 played.
  1272.  
  1273.       17h-0FFh     Reserved.
  1274.  
  1275. Paragraph style libraries
  1276.  
  1277. The paragraph style library is kept in three places:
  1278.  
  1279. 1)  WSSTYLE.OVR. This is the main  style library from which selec- tions
  1280. are made.
  1281.  
  1282. 2)  The file being edited contains copies of all styles that are used in
  1283. the  document  (this  library is kept at  the  end of the file. A 32-bit
  1284. pointer is placed in the header symmetrical sequence which points to the
  1285. beginning of the document's library).
  1286.  
  1287. 3)  A temporary file contains the current working copy of the document's
  1288. styles,  which  contains  the styles from  the  end of the document, the
  1289. library styles, and temporary styles while editing.
  1290.  
  1291.  File style library
  1292.  
  1293. The  header symmetrical sequence contains  a 32-bit absolute offset into
  1294. the  file  where  the style library  begins  (see the description of the
  1295. header  symmetrical sequence). This offset is actually the offset of the
  1296. master  index  which  may be used  for  structures  other than paragraph
  1297. styles.  This  offset  must  be on  a  sector  (128- byte) boundary. The
  1298. structure of the master index follows:
  1299.  
  1300. Byte:  1AH  --  End of file  indicator  regardless of WordStar fill- ing
  1301. remainder of last 128-byte sector with 1AH's.
  1302.  
  1303. Byte:  WordStar style version number in  BCD (55H for version 5.5). This
  1304. number  will  change to reflect the version  of WordStar when there is a
  1305. revision  in  the  style library  that  would  cause incom- patibilities
  1306. between versions.
  1307.  
  1308. Word:  Next 512-byte block number available relative to the index start,
  1309. not the document start.
  1310.  
  1311. Byte: Number of objects (currently 1, paragraph styles only).
  1312.  
  1313. Master  index  begins  here.  It currently  consists  of  only  1 object
  1314. (paragraph styles).
  1315.  
  1316. Word:  Number  of index entries allocated.  This  is the number of index
  1317. entries  that  are  available  for  use  in  the  blocks  that have been
  1318. allocated to the master index.
  1319.  
  1320. Word: Size of an object entry (102 decimal for paragraph styles).
  1321.  
  1322. Double  word:  Pointer to beginning of  object  index. Usually points to
  1323. next  byte  since paragraph styles are  the only object. This pointer is
  1324. relative  to  the beginning of the  master  index, not the document file
  1325. itself.
  1326.  
  1327. Object index begins here.
  1328.  
  1329. Byte: Number of index entries in this block. (14 for paragraph styles)
  1330.  
  1331. Double  word: Link to next index block.  This pointer is relative to the
  1332. beginning of the master index, not the document file itself.
  1333.  
  1334. Index items follow:
  1335.  
  1336. 24  bytes:  Object  name (paragraph  style  name,  left justified, blank
  1337. filled)
  1338.  
  1339. Byte: Used internally.
  1340.  
  1341. Word: Used internally.
  1342.  
  1343. Word: Used internally.
  1344.  
  1345. Double  word:  Pointer to style entry.  This  pointer is relative to the
  1346. beginning of the master index, not the document file itself.
  1347.  
  1348. The above index item is repeated for each indexed entry. If the block is
  1349. filled  with indexes, the link to next index  block can be used to go to
  1350. the next set of indexes.
  1351.  
  1352. Style entry:
  1353.  
  1354. 3   words:   Font  description.  See   the   font  symmetrical  sequence
  1355. description. First word is -1 if inherited.
  1356.  
  1357. 2 words: Reserved.
  1358.  
  1359. Word: Left margin in HMI, -2 (0fffeh) if inherited.
  1360.  
  1361. Word: Right margin in HMI, -2 (0fffeh) if inherited.
  1362.  
  1363. Word: Paragraph margin in HMI, -2 (0fffeh) if inherited.
  1364.  
  1365. Word: Reserved.
  1366.  
  1367. Byte: Number of regular tabs, 0 if inherited (also, first tab stop below
  1368. will be -1).
  1369.  
  1370. Byte: Number of decimal tabs, 0 if inherited (also, first tab stop below
  1371. will be -1).
  1372.  
  1373. 32  words: Tab stops in HMIs. Regular  tabs are first. If first tab stop
  1374. is -1 (0ffffh), then tabs are inherited.
  1375.  
  1376. Word: Reserved.
  1377.  
  1378. Byte:  Justification flag. 0 means no justification, -1 means inherit, 1
  1379. means right justified, -2 means centered, and -3 means flush right.
  1380.  
  1381. Byte:  Word  wrap  flag.  1 means word wrap  is  on,  0 is off, -1 means
  1382. inherit.
  1383.  
  1384. Word: Line height in VMI, -1 = inherit.
  1385.  
  1386. Byte: Line spacing (1-9), -1 = inherit.
  1387.  
  1388. 2  Words: Print attributes on, off. Bits  set in the first word indicate
  1389. those  attributes  are explicitly set to the  on  state. Bits set in the
  1390. second  word indicate those attributes are explic- itly set off. If both
  1391. corresponding  bits  are off, then the  attribute  is inherited from the
  1392. current state. Descriptions of the bits are as follows:
  1393.  
  1394. Strikeout         000000000000001B
  1395. Doublestrike         000000000000010B
  1396.  
  1397. Underlining         000000000001000B
  1398. Subscript         000000000010000B
  1399. Superscript         000000000100000B
  1400. Bold             000000001000000B
  1401. Italics             000000010000000B
  1402.  
  1403. Byte:  Color. See a description of  the color symmetrical se- quence. -1
  1404. means inherited.
  1405.  
  1406. 6 Bytes: Reserved. ### END
  1407. --
  1408. Andrew Stephenson
  1409.  
  1410.